﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace YakShaver.Contract
{
    [Serializable()]
    public class YakShaverWorkItem
    {

        private string _title;
        private Dictionary<string, object> _properties;
        private Guid _instanceId;

        public Guid InstanceId
        {
            get { return _instanceId; }
            set { _instanceId = value; }
        }

        public Dictionary<string, object> Properties
        {
            get { return _properties; }
            set { _properties = value; }
        }
        public string Title
        {
            get { return _title; }
            set { _title = value; }
        }

        private string _release;

        public string Release
        {
            get { return _release; }
            set { _release = value; }
        }

        private string _component;
        public string Component
        {
            get
            {
                return _component;
            }
            set
            {
                _component = value;
            }
        }

        private WorkItemType _workItemType;
        public WorkItemType WorkItemType
        {
            get
            {
                return _workItemType;
            }
            set
            {
                _workItemType = value;
            }
        }

        private WorkItemImpactType _workItemImpactType;
        public WorkItemImpactType WorkItemImpactType
        {
            get
            {
                return _workItemImpactType;
            }
            set
            {
                _workItemImpactType = value;
            }
        }

        private string _description;
        public string Description
        {
            get
            {
                return _description;
            }
            set
            {
                _description = value;
            }
        }

        private string _workItemId;
        public string WorkItemId
        {
            get { return _workItemId; }
            set { _workItemId = value; }
        }

        private WorkItemSubmissionStatus _status;

        public WorkItemSubmissionStatus Status
        {
            get { return _status; }
            set { _status = value; }
        }

         public override string ToString()
        {
            return string.Format("Work Item Component: {0} - Status: {5} Description: {1} - ImpactType: {2} - Item Type: {3} - AnalysisCallCount: {4}",
                _component, _description, _workItemImpactType, _workItemType, 0, _status
                );

        }

    }
    [Serializable()]
    public enum WorkItemSubmissionStatus
    {
        NeedIntervention,
        Ready,
    }
    
}
